package test;
import java.util.Iterator;

import common.Lists;
import common.Entity;
import common.ClientEntity;
import java.util.List;

public class listView extends Thread{
	public void run(){
		while(true){
			try{Thread.sleep(20000);}catch(Exception e){};
			
			Lists list=Lists.getInstance();
			System.out.println("****************************");
			System.out.println("==Live Servers==");
			for(int i=0;i<Lists.GROUP_SIZE;i++){
				System.out.println(" group: "+i);
				for(Iterator<Entity> it=list.getLiveServerGroup(i).iterator();it.hasNext();){
					System.out.println("  "+it.next().toString());
				}
			}
			System.out.println("==Live Clients==");
			List<ClientEntity> w=list.getLiveClientList();
			for(Iterator<ClientEntity> it=w.iterator();it.hasNext();){
				System.out.println("  "+it.next().toString());
			}
			System.out.println("****************************");
		}
	}
}
